Contents
Clipboard Generator

Clipboard Generator is an add-on for Microsoft® Visual C++.  It adds the ability to generate function headers, module headers, quickly insert commonly used strings, open commonly used files and insert columns.  It also gives the capability of running external filters and programs over a selected block, generating access members for class data members.  As the name implies, Clipboard Generator does this through the Windows Clipboard.  Clipboard Generator does not subclass, hook or inject itself into the address space of Visual C++.  It is designed to enhance, not interfere, with the normal operation of Visual C++.

Click on the picture below for help on a specific area, or choose help from one of the following topics:

Help Topics

Setup and configuration

Creating function headers

Creating module headers

Creating access functions

Appending text to the clipboard

Executing an external filter

Inserting a common string

Opening a common file

Inserting a column

Source Header Swap

Extract RTF as Text

Clipboard Generator Defaults

Clipboard Generator Configurations

Modifying the control files

Creating resource DLLs

The command line

Limitations and answers to common problems

Registration and contacting the author

Credits


Setup and configuration

Setting up Clipboard Generator.

The Clipboard Generator setup program copies the necessary files from the setup directory to a directory you specify and sets the default configuration options in your registry.  Clipboard Generator setup asks for three pieces of information.  Your name, a company name, and the directory to which you want it installed.

If the Overwrite existing control files check box is on, Clipboard Generator will replace any control files in the TEMPLATE sub-directory with the default control files.  If Update Registry Information is checked, Clipboard Generator will set the default configurations registry information to the use the default templates.  When initially installing Clipboard Generator, you will probably want to update the registry, and will not have any control files to overwrite.   On subsequent installs you will probably want both of these check boxes turned off.

Click on the picture below in the area where you want help

Configuring Clipboard Generator.

Clipboard Generator is ready for use immediately following setup. If desired, the default information can be changed on the Defaults tab, and new configurations can be added on the Configurations tab.

Setting up Clipboard Generator in Visual C++

Clipboard Generator is designed to be added to the tools menu of Visual C++. When doing so at least one command line parameter, the name of the file being edited,  is required.  This is specified by using the /f filename command line option.  In the Visual C++ tools setup use $File for the filename.  Because of the diverse actions available in Clipboard Generator, you may wish to assign them to separate tool menu items.

Below is an example of adding Clipboard Generator to Visual C++ 2.1.


Creating function headers

Function headers are comment blocks at the beginning of functions which describe what the function does.  The opinions about what makes a  proper function header are as diverse as the programmers using them, so flexibility must be allowed in specifying what the header contains.  Additionally, most function headers contain information not explicit in the function itself, such as the functions intended purpose or the meanings of a return code. Some means of gathering that information also must be available.  Clipboard Generator accomplishes both of these through the function header control file.  This file defines the final form of the header as well as the details of how the information is gathered.  If the header contained in the default templates are not to your liking, they may be changed to suit your taste and style.

To create a function header select the function definition in your module, execute Clipboard Generators function header action, fill in the function information, and the header appears!

Note: if autopaste is turned off in the defaults, it is necessary to copy the function to the clipboard before running Clipboard Generator, and then paste the results back into Visual C++ when it has finished running.  It is strongly recommended that autopaste is used when using Clipboard Generator.

A function header using the default template is shown on the function foo is shown below.

//----------------------------------------------------------------------
//                      CMyClass::foo
//----------------------------------------------------------------------
//
//  Purpose:    This function has no purpose - on purpose!
//
//  Arguments:
//              int n  - Number of ints
//              char **ppchar - Pointer to strings
//              struct mystruct * pStruct - Silly Structure
//
//  Returns:    char * - Pointer to nothing
//
//  Access:     Public - Accessible by anyone using this class
//
//  Revision history:
//      02/26/95          Tim Walker                Created.
//----------------------------------------------------------------------
char * CMyClass::foo( int n, char **ppchar, struct mystruct * pStruct )
{
}


Creating module headers

Module headers are comment blocks at the beginning of modules which describe what the module contains.  As with function headers, the opinions about what makes a  proper function header are as diverse as the programmers using them,  and they usually contain information not explicit in the module itself.  Clipboard Generator allows you to customize the module header through the module header control file.

To create a module header using the default templates move to the top of the module (this is not necessary in Visual C++ 2.x - Clipboard Generator will move to the top for you), execute Clipboard Generators module header action, fill in the module information, and the header appears!

Note: if autopaste is turned off in the defaults, it is necessary to paste the results back into Visual C++ when Clipboard Generator  has finished running.  It is strongly recommended that autopaste is used when using Clipboard Generator.

A module header using the default template is shown below.

//======================================================================
//
//                      (c) 1995 TimeWalker Software
//
//                          ALL RIGHTS RESERVED
//
//----------------------------------------------------------------------
//
//  Module:     FOOMODULE.CPP
//
//  Purpose:    This is a module which contains the function
//              foo and it's header
//
//  Revision history:
//      02/26/95          Tim Walker                Created.
//======================================================================


Creating access functions

Clipboard Generator is designed to ease the task of generating access functions for data members.  It will turn the declaration

int m_MyData;

into the access functions

int	SetMyData( int m)	{ return m_MyData = m; }

int	GetMyData()	const	{ return m_MyData; }

And as you would expect, the format and layout of the functions is completely customizable by modifying the access function control file.

To create the access functions select the block of data members, execute the access member action in Clipboard Generator, and the access functions appear!

Note: if autopaste is turned off in the defaults, it is necessary to paste the results back into Visual C++ when Clipboard Generator  has finished running.  It is strongly recommended that autopaste is used when using Clipboard Generator.


Appending text to the clipboard

The append action adds the currently selected text to what is already on the clipboard.  It has no user interface and is designed to be assigned a keystroke or button in Visual C++ 2.0.  This action allows you to move through a module selectively copying lines to the clipboard.  Once the lines are gathered they can be pasted as a single block.

An example of how this may be used is gathering all the function definitions in a module, then pasting them into a header file to make the function declarations.


Executing an external filter

An external filter can be any program, GUI or console, which you want to act on a block of text.  For example, you can the run the selected block through the sort filter to sort the lines alphabetically.  You can also write an your own program to manipulate the text in any way you desire.  The AWHSHL.EXE example which comes with Clipboard Generator prompts for an AWK script, then runs the text selected in Visual C++ module through an AWK interpreter (not included with Clipboard Generator!).   This allows you to extend Clipboard Generator to do specialized processing.

Clipboard Generator supports three types of external filters: Redirect, File Based and Literal.

Redirect filters use the Redirect Filter command line given in the Clipboard Generator defaults.  This filter is designed for use with programs which take their input as STDIN and put their output to STDOUT.  SORT.EXE  is an example of a program which uses redirect filtering.

File Based filters use the File Based Filter command line given in the Clipboard Generator defaults.  This filter is designed for use with programs that use files for their input and output.

The last type is a Literal Filter.  This doesnt use any Clipboard Generator defaults, but executes what you type.   To use Clipboard Generator temporary files with the filter use the place holders $_Input and $_Output.

There are three replaceable place holders used in executing filters.  These are $_Filter , $_Input and $_Output.  $_Filter is the name of the program you enter when running a redirect or file based filter.  It is not used for literal filters.  $_Input is a temporary file name Clipboard Generator generates.  The contents of the block selected in Visual C++ will be put into this file .  $_Output is another is a temporary file name Clipboard Generator generates.  The contents of this file will replace the selected block when the filter is finished executing.

Filters can be run directly by specifying the necessary command line options.

Click on the picture below for help in a specific area.


Inserting a common string

A common string is a string you use often and want to paste into a file without having to retype it each time. When you select the string from the list, the string is placed into the Visual C++ buffer at the current cursor location.  The common strings are read from the common string and files control file, and support the following place holders:

Place Holder	Meaning

$_UserID	This will be replaced by the text in the User name of the of the current configurations defaults tab.

$_CompanyName	This will be replaced by the text in the Company name of the of the current configurations defaults tab.

$_Filename	This will be replaced by the full file name (base plus extension) of the of the current file.  For this place holder to be used the /f filename command line must be used.

$_BaseFile	The file name without the extension.  For this place holder to be used the /f filename command line must be used.

$_Date	The current date.

$_Month	The current month.

$_Day	The current day.

$_Year	The current year.

Click on the picture below for help in a specific area.


Opening a common file

The common file list will cause Visual C++ to open the file you select from a list.  The common files are read from the common string and files control file,

Click on the picture below for help in a specific area.


Inserting a Column

This feature only works with Visual C++ 2.0 and later and inserts text on each row of the columns selected in the Visual C++ editor.

Click on the picture below for help in a specific area.


Source Header Swap

The source header swap file allows one to quickly swap between two files with the same filename and different extensions.  The intended purpose of this action is, as the name implies, to allow you to quickly swap between a source module and a corresponding header file.  The underlying assumption is that the header file will have the same name as the source module.  For example if you are editing a file with the name foo.cpp, and the Source swap group [CPP,HPP] exists, the file foo.hpp will be opened when the action is performed.  Similarly once in foo.hpp,  performing the action again will reopen foo.cpp.   The association between extensions is set in the defaults tab.  This action is particularly useful when assigned to a keystroke in Visual C++ 2.0.


Extract RTF as Text

This function will paste any RTF data in the clipboard into the editor as if it were text.  This is especially useful when working with the new RichEdit control.


Modifying the control files

There are three types distinct types of control files in Clipboard Generator: header control files,  access member control file, and the common strings/files control file.  Each of these have their own distinct syntax and purposes. Please click on the appropriate file type below for more help.

The header control files

The access member control file

The common files and strings control file


Creating resource DLLs

Resource DLLs are user supplied DLLs which contain the dialog box resources for function and module headers.  Included with Clipboard Generator is an example DLL and its source code.  These are located in the Clipboard Generators RESOURCE sub-directory.   If the control IDs in the default template are changed, or new controls added, the appropriate control file will have to be modified to take advantage of the changes.  The sample files are:

RESOURCE.H	- Header file for resources

TEMPLRES.C	- Stub  file for DLL entry point

TEMPLRES.MAK 	- Visual C++ 2.0 make file

TEMPLRES.RC 	- Dialog resources


The command line

Specifying an action

The Clipboard Generator command line allows each of its actions to be performed without having to go through the man selection dialog.  This allows specific actions, such as header insertion, to be assigned to a keystroke in Visual C++ 2.0  The following are the valid Clipboard Generator command line options.

/f filename - The filename to be used for the $_FileName parameter

/0 - Go directly to function header insertion

/1 - Go directly to module header insertion

/2 - Go directly to access member creation

/3 - Go directly to Clipboard append

/4 - Go directly to external filter

/5 - Go directly to insert common string

/6 - Go directly to open common file

/7  - Go directly to insert column

/8  - Go Extract RTF as Text

Filter specific switches

/E filtername -  The name of the filter program to execute.

/H  - Run Filter Hidden

/B  - Run File Based filter

If only /E is used the defaults will be redirect based and show normal. To run a file based filter, such AWKSHL.EXE,  the command line in the Visual C++ tools section is

     /f $FileName /4 /E awkshl /B


Limitations and answers to common problems

1.	Dialog box controls are disabled on all user dialogs unless a statement for that dialog control is in the control file.  If you modify the dialog templates be sure to also modify the corresponding control file.

2.	If you are not getting the file name in your expansions, it is probably because you are not using the /f filename command line argument

3.	The access function generation does not support multiple declarations in a single statement.  That is, the following cannot be parsed by Clipboard Generators access function action.
   int n1, n2, n3;

4.	Clipboard Generator does not support the old, non ANSI C style function declarations.  That is, the function argument names will not be found on function definitions such as:

   int foo( int, char )

int nInt;

char cChar;

5.	Function headers are not correctly generated for embdded classes. template member functions.  This will be fixed in a future release.

6.	Visual C++ 1.5 requires a \r\n in templates to force a new line.  Visual C++ only requires the \n.  If you have a template which works in Visual C++ 2.0, but has what looks like a lower case a for the linefeeds in Visual C++ 1.5, it means the extra \r  should be added to the template.


Clipboard Generator configurations

A configuration is another full set of Clipboard Generator default information. By setting up different configurations, one has the ability to quickly switch between sets of control files,  or change the company and user information.   Configurations can be defined for different projects, locations, or anything else you find useful. Click on the picture below for help in a specific area.


Clipboard Generator defaults

Clipboard Generator defaults tells file locations, and set preferences global preferences.  Some of the values, such as the user, company name and template path information are shared with Class Generator.

Click on the picture below for help in a specific area.


Registration and contacting the author

How To Register

The Generator applications can be registered by sending the registration fee to:

TimeWalker Software

7111 Tyler Street

Hudsonville MI 49426

Pricing

The license fee for an individual copy of Class Generator and Clipboard Generator is $25.00.  This entitles the registered user to use Class Generator on as many PC's as he/she/it wants.  Please contact the author for information on site or network licenses.

Support

If you have suggestions or questions you can get technical support through the above address or at

CIS: 72010,3260

Internet: 72010,3260@CIS.COM


Credits

I would like to thank John Williston of Williston Consulting for his helpful advice and even some of the code used in the development of Clipboard Generator.  His product, CodeTool, which performs many of the same tasks for Premias Codewright was instrumental in prompting me to write Clipboard Generator.

I would also like to thank the Lord Jesus Christ for giving me more than just joy and meaning in my present life, but also the assurance of ever more abounding riches in the life to come!


Access Function
A little function, usually placed right in the class declaration, which gives the public interface to the class data.


Template
Templates are strings which contain place holders which are expanded by Clipboard Generator  into their final form.


Get function
The access function which returns the value contained in the data member.


Put function
The access function which assigns a new value to the data member.


MainPageFunctionDescription
Gives a brief description of the selected action.


OKButton
Accepts and saves all the information on all the tabs.  If the Generator tab is selected OK will also perform the selected action.


CancelButton
Exits Clipboard Generator without performing any action or saving any information.


ApplyButton
Accepts and saves all the information on the current tab.


HelpButton
Brings up this help file for the currently active tab option.


ConfigDialog
This box contains a list of all of the Clipboard Generator configurations.  To change configurations simply select a the desired one out of the list.


SetupUserName
This is the user name which will be placed in the registry and used as the user name when templates are expanded.  It can be changed at any time from the defaults tab.


SetupCompanyName
This is the company name which will be placed in the registry and used as the company name when templates are expanded.  It can be changed at any time from the defaults tab.


SetupDestDir
Where setup is to copy the Generator applications executable files.  Templates and control files will be copied into a TEMPLATE directory below the destination directory.


SetupOverwrite
When checked setup coped the default templates and control files  over any files you may have of the same name.  Setup copies its template and control files into a TEMPLATE directory below the destination directory.


SetupUpdateRegistry
When checked and OK pressed, setup will update the default configuration in the registry to reflect the user, name, company name, directories  indicated on the setup screen and register any templates and control files installed.  When unchecked setup performs no registry operation at all.


SetupProgress
Tells which file setup is working on while it is working


SetupOK
Have setup go ahead and do the indicated actions


SetupCancel
End setup without it performing any actions.


FilterCommand
Any program, GUI or console, which you want to perform an action on a block of text.


FilterRedirect
Redirect filters use the Redirect Filter command line given in the Clipboard Generator Defaults.  This filter is designed for use with true filters, that is programs which take their input as STDIN and put their output to STDOUT.  SORT.EXE  is an example of a program which uses redirect filtering.


FilterFileBased
File Based filters use the File Based Filter command line given in the Clipboard Generator Defaults.  This filter is designed for use with programs that use files for their input and output.


FilterLiteral
Literal filters execute exactly what you type in.  To use Clipboard Generator temporary files with the filter use the place holders $_Input and $_Output.


Filter Visible
Make the filter program visible while it runs.


FilterHidden
Hide the filter program while it runs.


FilterOk
Run the filer program.


FilterCancel
End Clipboard Generator without running the filer.


StringList
Lists the strings which can be inserted.   The list is generated from the common string and files control file.


StringOK
Insert the selected string


StringCancel
End Clipboard Generator without inserting a string.


FileList
Lists the files which can be opened.   The list is generated from the common string and files control file.


FileOK
Open the selected file.


FileCancel
End Clipboard Generator without opening a file.


ColumnText
Type the text to be inserted into each row of the selected columns here.


ColumnTranslate
If checked the C escape sequences will be translated when the column is inserted.  For example \t will become a true tab.  Visual C++  will not do a column paste if the number of rows in the clipboard does not match the current selection.  Be careful if you use the \n escape with translation on.


ColumnOk
Insert the column text.


ColumnCancel
End Clipboard Generator without inserting  column text.


ConfigList
This box lists all of the available configurations.  If no configurations have been added, then only the Default configuration will appear.  Configurations are added or removed through the Configuration Tab


ConfigAdd
Press this button to add a new configuration to Clipboard Generator AND Class Generator.  Once the configuration has been added, and the OK or Apply Now button pressed, the new configuration will be available.  It will be necessary to add the necessary default information after it is created..


ConfigDelete
Pressing this button deletes a configuration from Clipboard Generator AND Class Generator.  To allow you to remove the category without losing all related information, Clipboard Generator does not remove the information from the Registry.  This gives the ability to re-enter the category name later and undelete the information.  If you wish to remove all traces of the configuration, and thus the undelete ability, you will have to do it manually with the registry editor.  An entire project can be deleted from the registry by deleting the entry HKEY_CURRENT_USER\Software\TimeWalker Software\Class Generator\Configuration Name.


DefaultsUserID
This is the string which will replace the $_UserID place holder in template expansion.  This information is shared with Class Generator, so any changes made here will also be reflected in Class Generator.


DefaultsTemplatePath
Clipboard Generator will search this path for the control files.  Directory names should be separated by semicolons.  e.g. C:\TEMPLATE;D:TEMPLATE.  This information is shared with Class Generator, so any changes made here will also be reflected in Class Generator.


DefaultsCompanyName
This is the string which will replace the $_CompanyName place holder in template expansion.  This information is shared with Class Generator, so any changes made here will also be reflected in Class Generator.


DefaultsFunctionHeaderFile
This is the name of the function header control file.  It must be located on the template search path.


DefaultsModuleHeaderFile
This is the name of the module header control file.  It must be located on the template search path.


DefaultsAccessMemberFile
This is the name of the access member control file.  It must be located on the template search path.


DefaultsCommonFile
This is the name of the common strings and files control file.  It must be located on the template search path.


DefaultsRedirectCmd
This is the command executed when the redirect filter option of the external filter action is executed. A redirect filter is designed for use programs which take their input as STDIN and put their output to STDOUT.   There are three replaceable place holders used when setting this command. These are $_Filter , $_Input and $_Output.  $_Filter is the name of the filter entered by the user on the external filter dialog. $_Input is a temporary file name Clipboard Generator generates.  The contents of the selected block will be put into this input file .  $_Output is another is a temporary file name Clipboard Generator generates.  The contents of this file will replace the selected block when the filter is finished executing.


DefaultsFilterCmd
This is the command executed when the file based filter option of the external filter action is executed. A file based filters is designed for use with programs that use files for their input and output.   There are three replaceable place holders used when setting this command. These are $_Filter , $_Input and $_Output.  $_Filter is the name of the filter entered by the user on the external filter dialog. $_Input is a temporary file name Clipboard Generator generates.  The contents of the selected block will be put into this input file .  $_Output is another is a temporary file name Clipboard Generator generates.  The contents of this file will replace the selected block when the filter is finished executing.


DefaultsAutoPaste
When this is on, Clipboard Generator will sent the appropriate commands to Visual C++ to cut and paste the text automatically.  If turned off you will have to copy everything to the clipboard manually before running Clipboard Generator.  When off some actions, such as clipboard append, will not operate correctly.


DefaultsByAction
When checked the generated access functions will be grouped by action.  That is, all set functions will be places in one block, and one all put functions in another.


DefaultsByVariable
When checked the generated access functions will be grouped by variable. That is, the Get and Put members for each variable will be together.


1Tim1_17
  Now to the King eternal, immortal, invisible, the only God, be honor and glory forever and ever. Amen. (NAS)


Source Swap Groups
This identifies filename extensions to be associated in the source header swap action.  The syntax is [ext1,ext2] where ext1 and ext2 are the two filename extensions to associate.  The association is bi-directional.  Multiple groups can be defined, and , if an extension is repeated the first one with a matching extension will be used.


The function and module header control files

The format of both the function and module files is identical and they are modified version of the standard Windows INI file. In each control file there must at least be template section which contains the actual header template.  Unlike most INI files there are no entries in this section.  Everything from the template section marker to the end of the file is considered part of the header template.  If the template uses a user dialog to gather information, the dialog control information sections must proceed the template section.

The template section of the default header module control file is:

//=====================================================================
//
//                      (c) $_Year $_CompanyName
//
//                          ALL RIGHTS RESERVED
//
//---------------------------------------------------------------------
//
//  Module:     $_Filename
//
//  Purpose:	$_DlgGet( "ID_PURPOSE" )
//
//  Revision history:
//      $_Date          $_UserID                Created.
//=====================================================================

The template is what specifies what form the header will take.  It will be expanded, the replacement text will be substituted for the place holders, and the expanded version placed onto the clipboard.  If the auto-paste option is turned on, it will also be pasted into the current file at the current cursor location. The place holders allowed in the function and module templates follow:

Place Holder	Meaning

$_UserID	This will be replaced by the text in the User name of the of the current configurations defualts tab.

$_CompanyName	This will be replaced by the text in the Company name of the of the current configurations defualts tab.

$_Filename	This will be replaced by the full file name (base plus extension) of the of the current file.  For this place holder to be used the /f filename command line must be used.

$_BaseFile	The file name without the extension.  For this place holder to be used the /f filename command line must be used.

$_Date	The current date.

$_Month	The current month.

$_Day	The current day.

$_Year	The current year.

$_Args	If a function definition has been parsed, this is all of the function arguments.  This is not usually needed in module definitions.

$_Function	If a function definition has been parsed, this is the function name.  This is not usually needed in module definitions.

$_Return	If a function definition has been parsed, this is the return type.  This is not usually needed in module definitions.

$_Const	If a function definition has been parsed, this is will be const if the function is declared as const.  It will be empty if it is non-const..  This is not usually needed in module definitions.

$_Static	If a function definition has been parsed, this is will be static if the function is declared as static.  It will be empty if it is non-static.  This is not usually needed in module definitions.

$_Inline	If a function definition has been parsed, this is will be inline if the function is declared as inline.  It will be empty if it is not inline.  This is not usually needed in module definitions.

$_FcnStatement	If a function definition has been parsed, this is the full function definition as passed into Clipboard Generator.  This is not usually needed in module definitions

$_ClassName	If a function definition has been parsed, this is class name.  This is not usually needed in module definitions

$_ClassFunc	If a function definition has been parsed, this is the class name and function name.  If the function is not a class member, it is only the function name.  This is not usually needed in module definitions

$_ArgX	If a function definition has been parsed, this is the argument number X, where X ranges from 0 to the number of arguments passed into the function.  This place holder consists of the argument data type and argument name.  This is not usually needed in module definitions

$_ArgNameX	If a function definition has been parsed, this is the variable name of argument number X, where X ranges from 0 to the number of arguments passed into the function.   This is not usually needed in module definitions

$_ArgReturnX	If a function definition has been parsed, this is the variable data type of argument number X, where X ranges from 0 to the number of arguments passed into the function.   This is not usually needed in module definitions

$_ArgDefaultX	If a function declaration has been parsed, this is the default parameter for argument number X, where X ranges from 0 to the number of arguments passed into the function.   This is not usually needed in module definitions

$_StartArgRepeat	This place holder is not replaced with text.  Instead it is used to signal the start of a template argument block, a section of the template which is expanded for each argument of the function.   This place holder must be on its own line.  Everything between it and the $_EndArgRepeat place holder will be repeated for each argument.  On each iteration the $_ArgRepeat place holder will be incremented.

$_EndArgRepeat	This place holder is not replaced with text.  Instead it is used to signal the end of a template argument block, a section of the template which is expanded for each argument of the function.   This place holder must be on its own line.  Everything between the $_StartArgRepeat place holder an it will be repeated for each argument.  On each iteration the $_ArgRepeat place holder will be incremented.

$_ArgRepeat	This place holder is replaced with the current argument number in a template argument block.  The number will start at 0 and be incremented by one each time.

$_DlgGet	This place holder gets information from a dialog box in a resource DLL and places it in the template.  This place holder is unusual in that it takes two arguments.  The first is an identifier of which control on the dialog is to provide information for the place holder.  The second is a governing value which specified how Clipboard Generator is to configure the dialog control.  If this place holder is used, the control file must have the user dialog control files listed below. The control identifier parameter can be any text string, as long as it is unique within the control file.  The action of the governing value parameter varies based on the type of control being use.  If a governing value in not needed or required, it can be left out of the place holder altogether.  Below is a summary of what the governing value does for the various types of controls.

Edit Control:	Governing value text will be placed in edit.

Static Control:	Governing value text will be placed in static.

List box:	Used as an association value (see the dialog control section below for details).

Combo box:	Used as an association value (see the dialog control section below for details).

Check Box:	Not used.

Radio Buttons:	Not used

The next two sections of the control file deal with user dialog boxes.  A user dialog box is a user supplied dialog box Clipboard Generator uses to gather information.  If your template does not require a dialog to gather its information, it does not use the $_DlgGet place holder, there is no need for these two sections in the control file.

The first user dialog control section is the dialog section.  This gives the name of the DLL containing the user dialog, and the resource ID of the dialog in the DLL.  For example the dialog section in the default module control file is:

[Dialog]
ResDllName="TEMPLRES.DLL"
ResID=102

The second user dialog control section is a dialog control section.  There is one dialog control section for each control on the user dialog Clipboard Generator uses.  Any control on a dialog which is does not have a control section, with the exception of static text which is not a control label, will be disabled by Clipboard Generator when it invokes the dialog box.  Clipboard Generator assumes that static text which immediately precedes an edit control in the tab order is a control label.

A dialog control  section used the identifier name used in the $_DlgGet statement as the section name.  The entries under this section depend on the type of dialog control.  The following lists the control types and their section entries.

Edit Control

Entry Name	Entry Meaning

ControlID	Numeric value of control on dialog template.

Type	Type of control on dialog. For an edit this is EDIT

Example:

[ID_PURPOSE]
ControlID=1000
Type = EDIT

Static Control

Entry Name	Entry Meaning

ControlID	Numeric value of control on dialog template.

Type	Type of control on dialog. For an edit this is STATIC

Example:

[ID_NAME]
ControlID=1000
Type = STATIC

List box

Entry Name	Entry Meaning

ControlID	Numeric value of control on dialog template.

Type	Type of control on dialog. For an edit this is LISTBOX

Fillx	Where x is the zero based index for the item in the list box.  The index numbers must be sequential.  Clipboard Generator stops reading on the first missing entry.
The fill line contains two values separated by a vertical bar (|).  The first value is the text which will be placed into the list box.  The second is an association value.  The association value is used to set the initial selection in the list box.  If the governing value in the $_DlgGet statement matches the association value, that line will be selected.  In the example below, if the template statement is
$_DlgGet( "ID_RETURN", "$_Return" )
the Fill1 text will be selected if the return type of the function (specified by the $_Return place holder) is BOOL.  Similarly the Fill2 text will be used if the return type is void.  If no associations are given, or none match, the first entry (Fill0) is selected.

Example:

[ID_RETURN]
ControlID=1006
Type = LISTBOX
Fill0= Unspecified
Fill1= TRUE if successful, FALSE otherwise | BOOL
Fill2= Nothing returned                    | void

Combo box

Entry Name	Entry Meaning

ControlID	Numeric value of control on dialog template.

Type	Type of control on dialog. For an edit this is COMBO

Fillx	Where x is the zero based index for the item in the combo box.  The index numbers must be sequential.  Clipboard Generator stops reading on the first missing entry.
The fill line contains two values separated by a vertical bar (|).  The first value is the text which will be placed into the combo box.  The second is an association value.  The association value is used to set the initial selection in the combo box.  If the governing value in the $_DlgGet statement matches the association value, that line will be selected.  In the example below, if the template statement is
$_DlgGet( "ID_RETURN", "$_Return" )
the Fill1 text will be selected if the return type of the function (specified by the $_Return place holder) is BOOL.  Similarly the Fill2 text will be used if the return type is void.  If no associations are given, or none match, the first entry (Fill0) is selected.

Example:

[ID_RETURN]
ControlID=1006
Type = COMBO
Fill0= Unspecified
Fill1= TRUE if successful, FALSE otherwise | BOOL
Fill2= Nothing returned                    | void

Radio Buttons

Entry Name	Entry Meaning

StartControlID	Numeric value of first button in the radio button group control.

EndControlID	Numeric value of last button in the radio button group control.

Type	Type of control on dialog. For an edit this is RADIO

Default	The zero based index of the radio button to be initially checked .  The control ID of the button to be checked is StartControlID + Default.

Buttonx	Where x is a zero based index of the radio buttons in the group.  The  Buttonx entry gives the text to use in the template expansion if button x is checked when the dialog box ends.

Example:

[ID_RETURN]
StartControlID=1001
EndControlID=1005
Type = RADIO
Default=2
Button0=Private - Only accessible by this class
Button1=Protected - Accessible by this and derived classes
Button2=Public - Accessible by anyone using this class
Button4=Global Scope - Accessible by everyone everywhere
Button3=Module Scope - Accessible only by functions in this module

Check Box

Entry Name	Entry Meaning

ControlID	Numeric value of control on dialog template.

Type	Type of control on dialog. For an edit this is CHECK

OnState	Text to be used in template expansion if the check  box is turned on.

OffState	Text to be used in template expansion if the check  box is turned off.

Example:

[ID_CHECKER]
ControlID=1006
Type = CHECK
OnState = Button On
OffState = Button Off


The access member control file

The access member control file is a standard Windows INI file which controls the customization of access member function generation.  The file is divided into two areas, the control area and the type information area.

The control area.

The control area gives setting for the overall generation of access functions. It has the section name Control, and there are currently six entries available.  These entries are:

Entry Name	Purpose

FunctionSectionSeperator	The label used to separate access functions when group by variable is selected.

PutSectionSeperator	 The label used to separate Put access functions from Get functions when group by action is selected.

GetSectionSeperator	The label used to separate Get access functions from Get functions when group by action is selected.

DefaultGetTemplate	The template which will be used to generate the Get access function if the current data type does not have a type specific entry in the type information area.  See the Access Member Template information below for details on creating an Access Member template.

DefaultPutTemplate	The template which will be used to generate the Put access function if the current data type does not have a type specific entry in the type information area.    See the Access Member Template information below for details on creating an Access Member template.

InitialIdentStrings	Semi-colon delimited set of string which are used to be stripped off of the front of the data member to get to the real Hungarian notation or variable name.

The Type Information Area

The type information gives the access functions specifics based for a particular data type. It is only necessary to override the pieces of  information you want changed from the defaults when specifying a data type. The each type is its own section heading.  Clipboard Generator looks for the special heading by stripping off the data type from the data member declaration, and removing all white space.  Thus a declaration of char far * would have a section name of CHARFAR*. EXCEPTION: For arrays the text ARRAY is appended to the end of the type.  In this way the declaration char name[2] would have a section name of CHARARRAY.  Within the section there can by up to three entries  They are:

Entry Name	Purpose

GetTemplate	The template which will be used to generate the Get access function for the type indicates in the current data type.

PutTemplate	The template which will be used to generate the Put access function for the type indicates in the current data type.

EquateName	This is designed to be used for the function parameter needed in the put functions.  It is the value to which  the data member will be equated.  This overrides the generated value in the $_EquateName place holder

Access Member Templates

Templates are strings which contain place holders which are expanded by Clipboard Generator into their final form.  The template is the heart of Clipboard Generator  for it is what allows you to modify the way the code is generated.  There are 4 place holders available.  They are:

Place Holder	Purpose

$_MemberName 	The $_MemberName is the name of the data member.

$_MemberType	Everything before the member name in the data member declaration.

$_FcnBase 	$_MemberName with the initial identification strings removed (if present), and than any "Hungarian notation" removed. The Hungarian notation is considered  all the letters in the member name up to the first upper case letter.  If the whole  name is lower case, the $_FcnBase and the  $_MemberName parameters are identical.

$_EquateName	If Hungarian notation is being used, the generated $_EquateName will be the type indicators used for that type.  e.g. if the MemberName is pchTemp, $_EquateName will be pch. This can be overridden on a data type basis using the EquateName entry the Type Information area of the INI file.


The common files and strings control file

The common files and string control file is a standard Windows INI file with two sections,  A Common string section and a common files section.

Common Strings

The common string section contains string entries in the form
StringX  = string value
where X is the zero based index value for the string and the string value is the common string to be inserted.  X must start at zero, increase by one, and the String entries must be sequential.  Clipboard Generator stops reading the string entries on the first break in the numbers.  See the sample control file below for an example.  Common string can use the following place holders:

Place Holder	Meaning

$_UserID	This will be replaced by the text in the User name of the of the current configurations defualts tab.

$_CompanyName	This will be replaced by the text in the Company name of the of the current configurations defualts tab.

$_Filename	This will be replaced by the full file name (base plus extension) of the of the current file.  For this place holder to be used the /f filename command line must be used.

$_BaseFile	The file name without the extension.  For this place holder to be used the /f filename command line must be used.

$_Date	The current date.

$_Month	The current month.

$_Day	The current day.

$_Year	The current year.

These place holders can be used to creates file specific strings, such as the include bracketing sting shown in the example below.

Common Files

The common files section contains string entries in the form
FileX  = File Name
where X is the zero based index value for the file and the File name is the file to be opened.  X must start at zero, increase by one, and the File entries must be sequential.  Clipboard Generator stops reading the file entries on the first break in the numbers.  See the sample control file below for an example.

Common files and strings Example:

[Common Strings]
String0=#ifndef __$_BaseFile__H_\r\n#define __$_BaseFile__H_\r\n
String1=#endif //end #ifndef __$_BaseFile__H_\r\n

[Common Files]
File0 = D:\WINDEV\TEMPLATE\common.ctl
File1 = D:\WINDEV\TEMPLATE\FCNHDR.CTL